#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2022/11/23 10:14
# @Author : 闫峰
# @File    : commonUtils.py
import hashlib


def Str_to_Hex(text):
    """计算id"""
    _byte = text.encode("utf-8")
    return _byte.hex()


def hash_md5(s):
    """计算ChangeToken"""
    res = s

    h = hashlib.md5()
    h.update(res.encode(encoding='UTF-8'))
    return h.hexdigest()